import { Informationv } from 'information-video-model.js';

var informationv = new Informationv();
Page({
	data: {
    fabulous:true,
    dataId:0,
    fabulousNum:10
	},
  onShareAppMessage: function (res) {
    console.log(res)
    if (res.from === 'button') {
      // 来自页面内转发按钮
      console.log(res.target)
    }
    return {
      title: '自定义转发标题',
      path: '/page/user?id=123',
      success: function (res) {
        console.log("转发成功") 
      },
      fail: function (res) {
        console.log("转发失败") // 转发失败
      }
    }
  },
  toInformationDetailsVideoPlay: function (e) {
    wx.navigateTo({
      url: '../information-video-details/information-video-details'
    });
  },
  onFabulous:function(e){
    console.log(e)
    var id = e.currentTarget.dataset.id;
    if(id==1){
      this.setData({
        dataId:0,
        fabulous:true,
         fabulousNum: 10
      })
    }else{
      this.setData({
        dataId: 1,
        fabulous: false,
        fabulousNum:10+1
      })
    }
  },
  toShowDetail: function (e) {
    wx.navigateTo({
      url: "../../goods/detail/detail"
    });
  },
})